﻿<%@ Page Title="" Language="C#" MasterPageFile="~/hgmanage/Main.Master" AutoEventWireup="true" CodeBehind="updatepwd.aspx.cs" Inherits="huaguwang.hgmanage.updatepwd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function() {
            var conbox = $("#old_pwd_box").children("input[type='password']");
            conbox.focus(function() {
                $("#lbtitle").html("");
            });
            conbox.blur(function() {
                var value = this.value;
                if (value == "") {
                    return;
                }
                PageMethods.CheckPwd(value, function(result) {
                    if (result) {
                        conbox.val("");
                        $("#lbtitle").html("原始密码不正确!");
                    }
                })
            });
        })
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="server">
    <dl class="form_table">
        <dt>
            <asp:Label ID="lblname" runat="server">管理员信息维护</asp:Label>
        </dt>
    </dl>
    <div class="info_done_box">
        <ul>
             <li><em>账户信息</em>
                 <asp:Label ID="lbUserName" runat="server" Text="" CssClass="lits"></asp:Label>
            </li>
            <li id="old_pwd_box"><em>原始密码</em>
                <asp:TextBox ID="txtName" runat="server" Width="300px" TextMode="Password"></asp:TextBox>
                <span style="color: Red">*</span>
                <span style="color: Gray; margin: 0 5px;">请输入原始密码</span> 
                <span id="lbtitle" class="lits"></span>
                <asp:RequiredFieldValidator ID="valrName" runat="server" ControlToValidate="txtName"
                    ErrorMessage="请输入原始密码;" Display="Dynamic"></asp:RequiredFieldValidator>
            </li>
            <li><em>新密码</em>
                <asp:TextBox ID="txtPwd" runat="server" Width="300px" TextMode="Password"></asp:TextBox>
                <span style="color: Red">*</span>
                <span style="color: Gray; margin: 0 5px;">请设置新的密码</span>
                <asp:RequiredFieldValidator ID="valrType" runat="server" ControlToValidate="txtPwd"
                    ErrorMessage="请设置新的密码;" Display="Dynamic"></asp:RequiredFieldValidator>
            </li>
             <li><em>确认密码</em>
                <asp:TextBox ID="txtPwd1" runat="server" Width="300px" TextMode="Password"></asp:TextBox>
                <span style="color: Red">*</span>
                <span style="color: Gray; margin: 0 5px;">请再次输入新密码</span>
                 <asp:CompareValidator ID="valcPwd" runat="server" ErrorMessage="两次输入不一至"
                  ControlToCompare="txtPwd" ControlToValidate="txtPwd1">
                 </asp:CompareValidator>
            </li>
            <li>
                <em></em>
                <asp:Button ID="btnAdd" runat="server" CssClass="btn_done" Text="保存信息" 
                    onclick="btnAdd_Click" />
            </li>            
        </ul>
    </div>
</asp:Content>
